/*
 * IdListaSingleton.h
 *
 *  Created on: 03/12/2010
 *      Author: julfc
 */
template <class T> class IdListaSingleton {

  private:
    IdListaSingleton(){;}
    static T* theInstance;

  public:
    static T* GetInstance() {
      if ( theInstance == NULL ) {
        theInstance = new T();
      }
      return theInstance;
    }
    template <class C> static T* GetInstance( C val ) {
      if ( theInstance == NULL ) {
        theInstance = new T(val);
      }
      return theInstance;
    }
    template <class C, class M> static T* GetInstance( C val1, M val2 ) {
      if ( theInstance == NULL ) {
        theInstance = new T(val1, val2);
      }
      return theInstance;
    }

};

template <class T>  T* IdListaSingleton<T>::theInstance = NULL;
